<?php

function smarty_function_getuserinfo($params, &$smarty) {
    $uid = $params['uid'];
    if($uid){
      $sql = "SELECT  pn_uda_value FROM  zk_user_data WHERE  pn_uda_propid =1 AND pn_uda_uid = ".$uid;
      $column = array("username");
      $result = DBUtil::executeSQL($sql);
      $objectArray = DBUtil::marshallObjects ($result, $column);
      $username = $objectArray['0']['username'];
    }else{
      $username= "";
    }

    return $username;
}
